package com.hotel.controller.admin;

import com.hotel.result.Result;
import com.hotel.service.BillService;
import com.hotel.vo.BillVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/bill")
@Api(tags = "账单接口")
public class BillController {
    /**
     * 根据入住id查询账单详情
     */
    @Autowired
    private BillService billService;
    @ApiOperation("根据入住id查询账单详情")
    @GetMapping("/{id}")
    public Result<BillVo> list(@ApiParam("入住id") @PathVariable Long id){
       BillVo bill = billService.list(id);
        return Result.success(bill);
    }
}
